package com.my12306.train.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.my12306.common.model.vo.PageVo;
import com.my12306.common.util.PageUtils;
import com.my12306.common.util.response.ResponseData;
import com.my12306.train.model.entity.RateEntity;
import com.my12306.train.model.vo.RateVO;

import java.util.List;

/**
 * 票种的票率
 *
 * @author ËÕÄÁÏ¦
 */
public interface RateService extends IService<RateEntity> {
    RateEntity findFirstByType(String type);

    /**
     * 保存
     * @param rate
     */
    ResponseData saveTickRate(RateVO rate);

    /**
     * 修改
     * @param rate
     */
    void updateTicketRateById(RateEntity rate);

    /**
     * 批量删除
     * @param ids
     */
    void removeTicketRateByIds(List<Long> ids);

    /**
     * 分页查询
     * @param pageVo
     * @return
     */
    PageUtils queryTicketRateByPage(PageVo pageVo);

    RateEntity queryTicketRateById(long id);

    RateEntity findFirstTicketRateByRatio(Double ratio);

    /**
     * 请求所以票种信息
     * @return
     */
    List<RateVO> queryAllTicketRate(int logicDelete);

}

